<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>星空绽放-为你而闪耀</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <div class="container">
        <canvas id="fireworksCanvas"></canvas>
        
        <div class="floating-texts" id="floatingTexts"></div>
        
        <div class="loading-indicator" id="loadingIndicator">
            <div class="spinner"></div>
            <p>正在加载资源，请稍候...</p>
            <div class="status-message" id="loadingStatus"></div>
            <div class="progress-container">
                <div class="progress-bar" id="progressBar" style="width: 0%"></div>
            </div>
        </div>
        
        <div class="hint-box" id="hintBox">
            <i class="fas fa-lightbulb"></i>提示：三击屏幕任意位置可显示/隐藏控制按钮
        </div>
        
        <div class="notification hidden" id="textNotification">
            <i class="fas fa-info-circle"></i> 文字设置已更新
        </div>
        
        <div class="page-title">
            <h1>整个星空为你而绽放＆小燕子</h1>
            <p>为具体而美好的生活喝彩-加油</p>
        </div>
        
        <div class="resource-status" id="resourceStatus">
            <div class="status-icon local" id="musicStatus"></div>
            <span>音乐</span>
            <div class="status-icon local" id="soundStatus"></div>
            <span>音效</span>
            <div class="status-icon local" id="imageStatus"></div>
            <span>图片</span>
            <div class="status-icon local" id="textStatus"></div>
            <span>文字</span>
        </div>
        
        <div class="top-controls">
            <div class="firework-counter">
                <i class="fas fa-fire"></i> 烟花绽放: <span id="fireworkCount">0</span>
            </div>
            <div class="audio-control" id="audioControl">
                <i class="fas fa-volume-up"></i>
            </div>
        </div>
        
        <div class="control-panel hidden" id="controlPanel">
            <h3><i class="fas fa-sliders-h"></i> 控制面板</h3>
            <div class="slider-container">
                <label for="fireworkFrequency"><i class="fas fa-bolt"></i> 烟花频率</label>
                <input type="range" id="fireworkFrequency" min="50" max="500" value="80">
            </div>
            <div class="slider-container">
                <label for="textFrequency"><i class="fas fa-font"></i> 文字频率 </label>
                <input type="range" id="textFrequency" min="0" max="5" value="2">
                <div class="level-indicator">
                    <span class="level-mark">0</span>
                    <span class="level-mark">1</span>
                    <span class="level-mark">2</span>
                    <span class="level-mark">3</span>
                    <span class="level-mark">4</span>
                    <span class="level-mark">5</span>
                </div>
            </div>
            <div class="slider-container">
                <label for="textSpeed"><i class="fas fa-tachometer-alt"></i> 文字速度 </label>
                <input type="range" id="textSpeed" min="0" max="5" value="2">
                <div class="level-indicator">
                    <span class="level-mark">0</span>
                    <span class="level-mark">1</span>
                    <span class="level-mark">2</span>
                    <span class="level-mark">3</span>
                    <span class="level-mark">4</span>
                    <span class="level-mark">5</span>
                </div>
            </div>
            <div class="slider-container">
                <label for="musicVolume"><i class="fas fa-music"></i> 音乐音量</label>
                <input type="range" id="musicVolume" min="0" max="100" value="50">
            </div>
            <div class="slider-container">
                <label for="soundVolume"><i class="fas fa-volume"></i> 音效音量</label>
                <input type="range" id="soundVolume" min="0" max="100" value="30">
            </div>
            
            <!-- 上传资源面板 -->
            <div class="upload-panel">
                <h4><i class="fas fa-cloud-upload-alt"></i> 上传资源</h4>
                
                <div class="upload-group">
                    <label class="upload-label" for="backgroundMusicUpload">
                        <i class="fas fa-music"></i> 背景音乐
                    </label>
                    <input type="file" id="backgroundMusicUpload" class="upload-input" accept="audio/*">
                    <div class="upload-status" id="musicUploadStatus"></div>
                </div>
                
                <div class="upload-group">
                    <label class="upload-label" for="fireworkSoundUpload">
                        <i class="fas fa-fire"></i> 烟花音效
                    </label>
                    <input type="file" id="fireworkSoundUpload" class="upload-input" accept="audio/*">
                    <div class="upload-status" id="soundUploadStatus"></div>
                </div>
                
                <div class="upload-group">
                    <label class="upload-label" for="imageUpload">
                        <i class="fas fa-image"></i> 图片 (最多5张)
                    </label>
                    <input type="file" id="imageUpload" class="upload-input" accept="image/*" multiple>
                    <div class="upload-status" id="imageUploadStatus"></div>
                </div>
                
                <div class="upload-group">
                    <label class="upload-label" for="textUpload">
                        <i class="fas fa-font"></i> 文字 (文本文件)
                    </label>
                    <input type="file" id="textUpload" class="upload-input" accept=".txt">
                    <div class="upload-status" id="textUploadStatus"></div>
                </div>
                
                <button class="upload-button" id="applyUploadsButton">
                    <i class="fas fa-check"></i> 应用所有上传
                </button>
            </div>
        </div>
        
        <div class="tv-box hidden" id="tvBox">
            <div class="tv-antenna">
                <div class="antenna"></div>
                <div class="antenna"></div>
            </div>
            <div class="tv-header">
                <div class="tv-logo">
                    <i class="fas fa-tv" style="color: white; font-size: 12.8px;"></i>
                </div>
                <div class="tv-title">小电视</div>
            </div>
            <div class="tv-screen">
                <div class="tv-image active" id="tvImage1"></div>
                <div class="tv-image" id="tvImage2"></div>
                <div class="tv-image" id="tvImage3"></div>
                <div class="tv-image" id="tvImage4"></div>
            </div>
            <div class="tv-info">
                <div class="info-item">
                    <span class="info-label">
                    <i class="fas fa-calendar-heart">❤️</i> 相识天数</span>
                    <span class="info-value"><span id="daysTogether">0</span>天</span>
                </div>
                <div class="info-item">
                    <span class="info-label"><i class="fas fa-thermometer-half"></i> 当前温度</span>
                    <span class="info-value" id="temperature">26°C</span>
                </div>
                <div class="info-item">
                    <span class="info-label"><i class="fas fa-clock"></i> 当前时间</span>
                    <span class="info-value" id="currentTime">00:00:00</span>
                </div>
                <div class="info-item">
                    <span class="info-label"><i class="fas fa-smile"></i> 今日心情</span>
                    <span class="info-value" id="mood">
                        <div class="mood-icons">
                            <span class="mood-icon">❤️</span>
                            <span class="mood-icon">❤️</span>
                            <span class="mood-icon">❤️</span>
                            <span class="mood-icon">❤️</span>
                            <span class="mood-icon">❤️</span>
                        </div>
                    </span>
                </div>
                <div class="info-item">
                    <span class="info-label"><i class="fas fa-cloud-sun"></i> 天气</span>
                    <span class="info-value" id="weather">晴 28°C</span>
                </div>
            </div>
        </div>
        
        <div class="button-container" id="buttonContainer">
            <button class="control-button" id="panelButton">
                <i class="fas fa-sliders-h"></i> 控制面板
            </button>
            <button class="control-button" id="tvButton">
                <i class="fas fa-tv"></i> 小电视
            </button>
        </div>
    </div>

    <audio id="backgroundMusic" loop></audio>
    <audio id="fireworkSound"></audio>

    <script src="app.js"></script>
</body>
</html>